import request from '@/utils/request'

export function create(data){
  return request({
    url: '/system/mail-template/create',
    method: 'post',
    data: data
  })
}
export function update(data) {
  return request({
    url: '/system/mail-template/update',
    method: 'put',
    data: data
  })
}

export function deleteTemplate(id) {
  return request({
    url: '/system/mail-template/delete/' + id,
    method: 'delete'
  })
}
export function getDetail(id){
  return request({
    url: '/system/mail-template/detail/'+id,
    method: 'get'
  })
}

export function page(query){
  return request({
    url: '/system/mail-template/page',
    method: 'get',
    params: query
  })
}
/** 发送测试 */
export function send(data){
  return request({
    url: '/system/mail-template/send-mail',
    method: 'post',
    data: data
  })
}
